#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main()
{
	int arr[9];
	int f = 1;
	for (int i = 0; i < 9; ++i)
	{
		scanf("%d", &arr[i]);
	}
	for (int i = 0; i < 9; ++i)
	{
		for (int j = 0; j < 9; ++j)
		{
			if (j == i)
			{
				continue;
			}
			else if (arr[i] == arr[j])
			{
				f = 0;
				break;
			}
		}
		if (f == 1)
		{
			printf("%d\n", arr[i]);
			break;
		}
		f = 1;
	}
	return 0;
}
